enum LogLevel { off, error, warn, info, dbg, on }

class LogPrint {
  static LogLevel level = LogLevel.info;
  static void _log(LogLevel e, String info) {
    if (e.index <= level.index) print('[${e.name}]->$info');
  }

  static void logErr(String info) {
    _log(LogLevel.error, info);
  }

  static void logWarn(String info) {
    _log(LogLevel.warn, info);
  }

  static void logInfo(String info) {
    _log(LogLevel.info, info);
  }

  static void logDbg(String info) {
    _log(LogLevel.dbg, info);
  }
}
